﻿using DFGK_WMS.Model.DTO;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    public interface ITDictItemRepository: IBaseRepository<TDictItem>
    {
        bool AddTDictItem(TDictItem dictItem);
        /// <summary>
        /// 根据字典name查询字典
        /// </summary>
        /// <param name="keyword"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<GetTDicItemDto> GetAllTDictItem(string? keyword,int typeId, int pageIndex, int pageSize, out int totalCount);

        List<MenuDto> GetMenuLists(int pageIndex, int pageSize, out int totalCount,int typeid, string name);
        bool UpdTDictItem(TDictItem dictItem);
        bool DelTDictItem(int id);
        TDictItem GetTDictItemById(int id);
        /// <summary>
        /// 根据字典类型查询字典项
        /// </summary>
        /// <param name="dictypeId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<GetTDicItemDto> GetTDictItemByDicTypeId(int dictypeId, int pageIndex, int pageSize, out int totalCount);
        /// <summary>
        /// 字典项树
        /// </summary>
        /// <param name="itemName"></param>
        /// <returns></returns>
        List<TDictItemDto> GetTDictItemTreeByitemName(string? itemName,int typeId);
        List<TDictItem> GetDictItems();
    }
}
